<?php


namespace app\api\controller;

use app\admin\model\TeamSourceModel;
use app\api\model\Token;
use app\common\controller\Api;
use app\common\library\Sms as Smslib;
use app\common\model\CateModel;
use app\common\model\DouyinModel;
use app\common\model\ItemModel;
use app\common\model\SourceModel;
use app\common\model\StaffModel;
use think\facade\Hook;
use think\facade\Validate;
use think\Request;
use util\Http;

/**
 * @title 授权登陆
 * @controller api\controller\Sms
 * @group base
 */
class Index extends Api
{

    public function share()
    {
        $data = (new SourceModel())->share($this->request_array);
        $data['code'] == 200 ? $this->success($data['msg'], $data['data']) : $this->error($data['msg']);
    }

    public function getDyLastItemTime(){
        $data = (new ItemModel())->getDyLastItemTime($this->request_array);
        $data['code'] == 200 ? $this->success($data['msg'], $data['data']) : $this->error($data['msg']);
    }

    public function getCate(){
        $data = (new CateModel())->getList($this->request_array);
        $data['code'] == 200 ? $this->success($data['msg'], $data['data']) : $this->error($data['msg']);
    }



    public function index(){
        $data = (new SourceModel())->getIndex($this->request_array);
        $data['code'] == 200 ? $this->success($data['msg'], $data['data']) : $this->error($data['msg']);
    }

    public function getIndexTeamSource(){
        $data = (new TeamSourceModel())->getIndexTeamSource($this->request_array);
        $data['code'] == 200 ? $this->success($data['msg'], $data['data']) : $this->error($data['msg']);
    }

}